import PropTypes from "prop-types"
import React, { memo } from "react"

import RoomItem from "../room-item"
import { ContentWrapper } from "./style"

const SectionContent = memo((props) => {
  const { data } = props
  return (
    <ContentWrapper>
      <div className="content">
        {
          data.list.map(item => {
            return <RoomItem itemData={item} itemWidth={data.itemWidth} key={item.id} />
          })
        }
      </div>
    </ContentWrapper>
  )
});

SectionContent.propTypes = {
  data: PropTypes.object
};

export default SectionContent
